home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / mmailp.idb / usr / lib / Zmail / bin / sh-versions / shownonascii.z / shownonascii
Encoding:
Text File  |  1997-01-22  |  2.8 KB  |  96 lines

  1. :
  2. # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
  3. # Permission to use, copy, modify, and distribute this material 
  4. # for any purpose and without fee is hereby granted, provided 
  5. # that the above copyright notice and this permission notice 
  6. # appear in all copies, and that the name of Bellcore not be 
  7. # used in advertising or publicity pertaining to this 
  8. # material without the specific, prior written permission 
  9. # of an authorized representative of Bellcore.  BELLCORE 
  10. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
  11. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
  12. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  13.  
  14. # Conversion from C shell to Bourne shell by Z-Code Software Corp.
  15. # Conversion Copyright (c) 1992 Z-Code Software Corp.
  16. # Permission to use, copy, modify, and distribute this material
  17. # for any purpose and without fee is hereby granted, provided
  18. # that the above copyright notice and this permission notice
  19. # appear in all copies, and that the name of Z-Code Software not
  20. # be used in advertising or publicity pertaining to this
  21. # material without the specific, prior written permission
  22. # of an authorized representative of Z-Code.  Z-CODE SOFTWARE
  23. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
  24. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
  25. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  26.  
  27. # Brought into line with metamail 2.7 beta release Csh version
  28. #    Dave Shield    February 1994
  29.  
  30. MYFONTDIR=/this/directory/COOPER/almost/certainly/COOPER/does/not/exist
  31.  
  32. CHARSET=$1
  33. shift
  34.  
  35. if test "$1" = "-e"
  36. then
  37.     shift
  38.     CMD='"$@"'
  39.     RIGHTTERMCMD='"$@"'
  40. else
  41.     CMD='more "$@" /dev/null'
  42.     RIGHTTERMCMD='more "$@"'
  43. fi
  44.  
  45. if test ! -z "${MM_CHARSET:-}"
  46. then
  47.     if test "$MM_CHARSET" = "$CHARSET"
  48.     then
  49.         eval $RIGHTTERMCMD
  50.         exit 0
  51.     fi
  52. fi
  53. for f in "${MM_AUXCHARSETS:-}"
  54. do
  55.     if test "$f" = "$CHARSET"
  56.     then
  57.         eval $RIGHTTERMCMD
  58.         exit 0
  59.     fi
  60. done
  61.  
  62. if test ! -d "$MYFONTDIR"
  63. then
  64.     echo This message contains non-ASCII text, but the $CHARSET font
  65.     echo has not yet been installed on this machine.  What follows
  66.     echo "may be partially unreadable, but the English (ASCII) parts"
  67.     echo "should still be readable."
  68.     cat "$@"
  69.     exit 0
  70. fi
  71.  
  72. if test -z "${DISPLAY:-}"
  73. then
  74.     echo This message contains non-ASCII text, which can only be displayed
  75.     echo properly if you are running X11.  What follows
  76.     echo "may be partially unreadable, but the English (ASCII) parts"
  77.     echo "should still be readable."
  78.     cat "$@"
  79.     exit 0
  80. fi
  81.  
  82. FPGREP=`xset q | grep $MYFONTDIR`
  83. if test -z "${FPGREP:-}"
  84. then
  85.     echo Adding $MYFONTDIR to your font path.
  86.     xset +fp "$MYFONTDIR"
  87. else
  88.     echo Your font path appears to be correctly set.
  89. fi
  90.  
  91.  
  92. echo Running xterm to display text in $CHARSET, please wait...
  93. unset MM_NOTTY
  94. eval xterm -fn '"*`echo $CHARSET | sed -e s/iso-/iso/`"' -e $CMD
  95.